<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span>
</span><span id="line-2"></span><span class="hs-comment">-- | The ModuleName type</span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Unit.Module.Name</span><span>
</span><span id="line-4"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier">ModuleName</span></a></span><span>
</span><span id="line-5"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#pprModuleName"><span class="hs-identifier">pprModuleName</span></a></span><span>
</span><span id="line-6"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier">moduleNameFS</span></a></span><span>
</span><span id="line-7"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier">moduleNameString</span></a></span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameSlashes"><span class="hs-identifier">moduleNameSlashes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameColons"><span class="hs-identifier">moduleNameColons</span></a></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#mkModuleName"><span class="hs-identifier">mkModuleName</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#mkModuleNameFS"><span class="hs-identifier">mkModuleNameFS</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#stableModuleNameCmp"><span class="hs-identifier">stableModuleNameCmp</span></a></span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#parseModuleName"><span class="hs-identifier">parseModuleName</span></a></span><span>
</span><span id="line-13"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-14"></span><span class="hs-keyword">where</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#"><span class="hs-identifier">Control.DeepSeq</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#"><span class="hs-identifier">Text.ParserCombinators.ReadP</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Parse</span></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#"><span class="hs-identifier">Text.ParserCombinators.ReadP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier">ReadP</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier">isAlphaNum</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-comment">-- | A ModuleName is essentially a simple string, e.g. @Data.List@.</span><span>
</span><span id="line-33"></span><span class="hs-keyword">newtype</span><span> </span><span id="ModuleName"><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ModuleName"><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-36"></span><span>  </span><span id="local-6989586621680801790"><span class="annot"><span class="annottext">getUnique :: ModuleName -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span id="local-6989586621680801788"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801788"><span class="hs-identifier hs-var">nm</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801788"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680801785"><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>  </span><span id="local-6989586621680801779"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801779"><span class="hs-identifier hs-var">nm1</span></a></span></span><span> </span><span id="local-6989586621680801778"><span class="annot"><span class="annottext">== :: ModuleName -&gt; ModuleName -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">==</span></span></span><span> </span><span id="local-6989586621680801777"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801777"><span class="hs-identifier hs-var">nm2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801779"><span class="hs-identifier hs-var">nm1</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; Unique -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801777"><span class="hs-identifier hs-var">nm2</span></a></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680801762"><span id="local-6989586621680801764"><span id="local-6989586621680801766"><span id="local-6989586621680801768"><span id="local-6989586621680801770"><span id="local-6989586621680801772"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-42"></span><span>  </span><span id="local-6989586621680801760"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801760"><span class="hs-identifier hs-var">nm1</span></a></span></span><span> </span><span id="local-6989586621680801759"><span class="annot"><span class="annottext">compare :: ModuleName -&gt; ModuleName -&gt; Ordering
</span><span class="hs-operator hs-var hs-var hs-var hs-var">`compare`</span></span></span><span> </span><span id="local-6989586621680801757"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801757"><span class="hs-identifier hs-var">nm2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; ModuleName -&gt; Ordering
</span><a href="GHC.Unit.Module.Name.html#stableModuleNameCmp"><span class="hs-identifier hs-var">stableModuleNameCmp</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801760"><span class="hs-identifier hs-var">nm1</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801757"><span class="hs-identifier hs-var">nm2</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680801754"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-45"></span><span>  </span><span id="local-6989586621680801752"><span class="annot"><span class="annottext">ppr :: ModuleName -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; SDoc
</span><a href="GHC.Unit.Module.Name.html#pprModuleName"><span class="hs-identifier hs-var">pprModuleName</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680801748"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-48"></span><span>  </span><span id="local-6989586621680801743"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; ModuleName -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680801741"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680801741"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span id="local-6989586621680801740"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801740"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; FastString -&gt; IO ()
forall a. Binary a =&gt; BinHandle -&gt; a -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680801741"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801740"><span class="hs-identifier hs-var">fs</span></a></span><span>
</span><span id="line-49"></span><span>  </span><span id="local-6989586621680801735"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO ModuleName
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680801733"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680801733"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621680801732"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801732"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO FastString
forall a. Binary a =&gt; BinHandle -&gt; IO a
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680801733"><span class="hs-identifier hs-var">bh</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; IO ModuleName
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; ModuleName
</span><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801732"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680801705"><span id="local-6989586621680801707"><span id="local-6989586621680801709"><span id="local-6989586621680801711"><span id="local-6989586621680801713"><span id="local-6989586621680801715"><span id="local-6989586621680801717"><span id="local-6989586621680801719"><span id="local-6989586621680801721"><span id="local-6989586621680801723"><span id="local-6989586621680801728"><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span></span></span></span></span></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-52"></span><span>  </span><span class="hs-comment">-- don't traverse?</span><span>
</span><span id="line-53"></span><span>  </span><span id="local-6989586621680801703"><span class="annot"><span class="annottext">toConstr :: ModuleName -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">toConstr</span></a></span></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr
</span><a href="GHC.Utils.Misc.html#abstractConstr"><span class="hs-identifier hs-var">abstractConstr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ModuleName&quot;</span></span><span>
</span><span id="line-54"></span><span>  </span><span id="local-6989586621680801698"><span class="annot"><span class="annottext">gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c ModuleName
</span><a href="../../base/src/Data.Data.html#gunfold"><span class="hs-identifier hs-var hs-var hs-var hs-var">gunfold</span></a></span></span><span> </span><span class="annot"><span class="annottext">forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">forall r. r -&gt; c r
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Constr -&gt; c ModuleName
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;gunfold&quot;</span></span><span>
</span><span id="line-55"></span><span>  </span><span id="local-6989586621680801695"><span class="annot"><span class="annottext">dataTypeOf :: ModuleName -&gt; DataType
</span><a href="../../base/src/Data.Data.html#dataTypeOf"><span class="hs-identifier hs-var hs-var hs-var hs-var">dataTypeOf</span></a></span></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; DataType
</span><a href="../../base/src/Data.Data.html#mkNoRepType"><span class="hs-identifier hs-var">mkNoRepType</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ModuleName&quot;</span></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#NFData"><span class="hs-identifier hs-type">NFData</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-58"></span><span>  </span><span id="local-6989586621680801689"><span class="annot"><span class="annottext">rnf :: ModuleName -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var hs-var hs-var hs-var">rnf</span></a></span></span><span> </span><span id="local-6989586621680801687"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801687"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801687"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; () -&gt; ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#stableModuleNameCmp"><span class="hs-identifier hs-type">stableModuleNameCmp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ordering</span></span><span>
</span><span id="line-61"></span><span class="hs-comment">-- ^ Compares module names lexically, rather than by their 'Unique's</span><span>
</span><span id="line-62"></span><span id="stableModuleNameCmp"><span class="annot"><span class="annottext">stableModuleNameCmp :: ModuleName -&gt; ModuleName -&gt; Ordering
</span><a href="GHC.Unit.Module.Name.html#stableModuleNameCmp"><span class="hs-identifier hs-var hs-var">stableModuleNameCmp</span></a></span></span><span> </span><span id="local-6989586621680801686"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801686"><span class="hs-identifier hs-var">n1</span></a></span></span><span> </span><span id="local-6989586621680801685"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801685"><span class="hs-identifier hs-var">n2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; FastString
</span><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-var">moduleNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801686"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-operator hs-var">`compare`</span></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; FastString
</span><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-var">moduleNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621680801685"><span class="hs-identifier hs-var">n2</span></a></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#pprModuleName"><span class="hs-identifier hs-type">pprModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-65"></span><span id="pprModuleName"><span class="annot"><span class="annottext">pprModuleName :: ModuleName -&gt; SDoc
</span><a href="GHC.Unit.Module.Name.html#pprModuleName"><span class="hs-identifier hs-var hs-var">pprModuleName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span id="local-6989586621680801684"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801684"><span class="hs-identifier hs-var">nm</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-66"></span><span>    </span><span class="annot"><span class="annottext">(PprStyle -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#getPprStyle"><span class="hs-identifier hs-var">getPprStyle</span></a></span><span> </span><span class="annot"><span class="annottext">((PprStyle -&gt; SDoc) -&gt; SDoc) -&gt; (PprStyle -&gt; SDoc) -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621680801682"><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680801682"><span class="hs-identifier hs-var">sty</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-67"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">PprStyle -&gt; Bool
</span><a href="GHC.Utils.Outputable.html#codeStyle"><span class="hs-identifier hs-var">codeStyle</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="#local-6989586621680801682"><span class="hs-identifier hs-var">sty</span></a></span><span>
</span><span id="line-68"></span><span>        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FastZString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ztext"><span class="hs-identifier hs-var">ztext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; FastZString
</span><a href="GHC.Data.FastString.html#zEncodeFS"><span class="hs-identifier hs-var">zEncodeFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801684"><span class="hs-identifier hs-var">nm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-69"></span><span>        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ftext"><span class="hs-identifier hs-var">ftext</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801684"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-type">moduleNameFS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>
</span><span id="line-72"></span><span id="moduleNameFS"><span class="annot"><span class="annottext">moduleNameFS :: ModuleName -&gt; FastString
</span><a href="GHC.Unit.Module.Name.html#moduleNameFS"><span class="hs-identifier hs-var hs-var">moduleNameFS</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span id="local-6989586621680801677"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801677"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801677"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-type">moduleNameString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-75"></span><span id="moduleNameString"><span class="annot"><span class="annottext">moduleNameString :: ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var hs-var">moduleNameString</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span id="local-6989586621680801676"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801676"><span class="hs-identifier hs-var">mod</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; String
</span><a href="GHC.Data.FastString.html#unpackFS"><span class="hs-identifier hs-var">unpackFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801676"><span class="hs-identifier hs-var">mod</span></a></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#mkModuleName"><span class="hs-identifier hs-type">mkModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-78"></span><span id="mkModuleName"><span class="annot"><span class="annottext">mkModuleName :: String -&gt; ModuleName
</span><a href="GHC.Unit.Module.Name.html#mkModuleName"><span class="hs-identifier hs-var hs-var">mkModuleName</span></a></span></span><span> </span><span id="local-6989586621680801674"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680801674"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; ModuleName
</span><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier hs-var">mkFastString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680801674"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#mkModuleNameFS"><span class="hs-identifier hs-type">mkModuleNameFS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-81"></span><span id="mkModuleNameFS"><span class="annot"><span class="annottext">mkModuleNameFS :: FastString -&gt; ModuleName
</span><a href="GHC.Unit.Module.Name.html#mkModuleNameFS"><span class="hs-identifier hs-var hs-var">mkModuleNameFS</span></a></span></span><span> </span><span id="local-6989586621680801672"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801672"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; ModuleName
</span><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-var">ModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680801672"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-comment">-- |Returns the string version of the module name, with dots replaced by slashes.</span><span>
</span><span id="line-84"></span><span class="hs-comment">--</span><span>
</span><span id="line-85"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameSlashes"><span class="hs-identifier hs-type">moduleNameSlashes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-86"></span><span id="moduleNameSlashes"><span class="annot"><span class="annottext">moduleNameSlashes :: ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameSlashes"><span class="hs-identifier hs-var hs-var">moduleNameSlashes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680801671"><span class="hs-identifier hs-var">dots_to_slashes</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String)
-&gt; (ModuleName -&gt; String) -&gt; ModuleName -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var">moduleNameString</span></a></span><span>
</span><span id="line-87"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680801671"><span class="annot"><span class="annottext">dots_to_slashes :: String -&gt; String
</span><a href="#local-6989586621680801671"><span class="hs-identifier hs-var hs-var">dots_to_slashes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680801668"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801668"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801668"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="../../filepath/src/System.FilePath.Windows.html#pathSeparator"><span class="hs-identifier hs-var">pathSeparator</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801668"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-comment">-- |Returns the string version of the module name, with dots replaced by colons.</span><span>
</span><span id="line-90"></span><span class="hs-comment">--</span><span>
</span><span id="line-91"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#moduleNameColons"><span class="hs-identifier hs-type">moduleNameColons</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-92"></span><span id="moduleNameColons"><span class="annot"><span class="annottext">moduleNameColons :: ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameColons"><span class="hs-identifier hs-var hs-var">moduleNameColons</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621680801666"><span class="hs-identifier hs-var">dots_to_colons</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String)
-&gt; (ModuleName -&gt; String) -&gt; ModuleName -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="GHC.Unit.Module.Name.html#moduleNameString"><span class="hs-identifier hs-var">moduleNameString</span></a></span><span>
</span><span id="line-93"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680801666"><span class="annot"><span class="annottext">dots_to_colons :: String -&gt; String
</span><a href="#local-6989586621680801666"><span class="hs-identifier hs-var hs-var">dots_to_colons</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680801664"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801664"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801664"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801664"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="annot"><a href="GHC.Unit.Module.Name.html#parseModuleName"><span class="hs-identifier hs-type">parseModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="GHC.Unit.Module.Name.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-96"></span><span id="parseModuleName"><span class="annot"><span class="annottext">parseModuleName :: ReadP ModuleName
</span><a href="GHC.Unit.Module.Name.html#parseModuleName"><span class="hs-identifier hs-var hs-var">parseModuleName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; ModuleName) -&gt; ReadP String -&gt; ReadP ModuleName
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ModuleName
</span><a href="GHC.Unit.Module.Name.html#mkModuleName"><span class="hs-identifier hs-var">mkModuleName</span></a></span><span>
</span><span id="line-97"></span><span>                </span><span class="annot"><span class="annottext">(ReadP String -&gt; ReadP ModuleName)
-&gt; ReadP String -&gt; ReadP ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP String
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#munch1"><span class="hs-identifier hs-var">Parse.munch1</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680801662"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801662"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801662"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680801662"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_.&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span></pre></body></html>